﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>我的信息</title>

	<link href="css/index.css" rel="stylesheet" type="text/css" />
	<link href="css/register.css" rel="stylesheet" type="text/css" />
  </head>
  
  <body>
	<%@ include file="../public/head.jsp" %>		
		<div id="hr-body">
		    <div class="hr-body-content">
			   <TABLE class=hr-body-layout width="100%">
				  <TBODY>
				  <TR>
				    <%@ include file="../public/userleft.jsp" %>
				      <TD class=hr-bl-right vAlign=top>
				      	<DIV class=MemberCenterWrap>
				      	  <div class="TableWrap MemberOrderList">
				      		<H2>欢迎进入管理菜单->会员信息</H2>
				      		<ul>
				      			<li>
				      			<table class="list" cellpadding="0" cellspacing="0" width="100%">
				       				<thead>
				       					<tr>
				       						<th>姓名</th>
				       						<th>密码</th>
				       						<th>电话</th>
				       						<th>收货地址</th>
				       						<th>修改注册信息</th>
				       					</tr>
				       				</thead>
				       				<tbody id="user-table">
				       						<tr>
				       						<td>${my.username}</td>
				       						<td>${my.password}</td>
				       						<td>${my.phone}</td>
				       						<td>${my.addr}</td>
				       						<td><a href="javascript:void(0)" id="changelink">修改</a></td>
				       						</tr>
				       				</tbody>
				       			</table>
				       			</li>
				       			<li id="change" style="display:none;">
				       			<form method="post" action="changeuser" onsubmit="return check();">
	       						<input type="text" value="${my.username}" name="username" id="username"/>
	       						<input type="text" value="" name="password" id="password"/>
	       						<input type="text" value="${my.phone}" name="phone" id="phone"/>
	       						<input type="text" value="${my.addr}" name="addr" id="addr"/>
	       						<input type="hidden" name="id" value="${my.id}"/>
	       						<input type="submit" value="保存"/>
	       						</form>
	       						</li>
				      		</ul>	
							</div>
						</DIV>
					</TD>
				</TR>
			</TBODY>
			</TABLE>
			<%@include file="../public/bottom.jsp" %>
			</div>
		</div>
     	
		<%@ include file="../public/foot.jsp" %>
		<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
		<script type="text/javascript">
		function check(){
			var username = $('#username').val();
			var password = $('#password').val();
			var phone = $('#phone').val();
			var addr = $('#addr').val();
			if(username==""||username==null||password==""||password==null||phone==""||phone==null||addr==""||addr==null){
				alert('注册信息不能为空');
			}else{
				return true;
			}
			return false;
		}
		$(function(){
			$('#changelink').click(function(){
				$('#change').show('slow');
			});
		});
		</script>
  </body>
</html>
